/*
 * Copyright (c) 2017 by Gerrit Grunwald
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package eu.hansolo.fx.charts.color;

import eu.hansolo.fx.charts.tools.Helper;
import javafx.scene.paint.Color;


public enum FlatColors implements Colors {
    A1(26, 188, 156),   A2(22, 160, 133),   A3(46, 204, 113),   A4(39, 174, 96),
    A5(52, 152, 219),   A6(41, 128, 185),   A7(52, 73, 94),     A8(44, 62, 80),
    A9(234, 76, 136),   A10(202, 44, 104),  A11(155, 89, 182),  A12(142, 68, 173),
    A13(241, 196, 15),  A14(243, 156, 18),  A15(231, 76, 60),   A16(192, 57, 43),
    A17(236, 240, 241), A18(189, 195, 199), A19(149, 165, 166), A20(127, 140, 141),

    B1(255, 204, 188), B2(255, 172, 156),  B3(255, 140, 124),  B4(255, 124, 108),
    B5(255, 108,  92), B6(247,  92,  76),  B7(231,  76,  60),  B8(215,  60,  44),
    B9(199,  44,  28), B10(183,  28,  12), B11(167,  12,   0), B12(135,  0,   0),

    C1(255, 188, 216), C2(255, 140, 200),  C3(255, 124, 184),  C4(255, 108, 168),
    C5(250,  92, 152), C6(234,  76, 136),  C7(218,  60, 120),  C8(202,  44, 104),
    C9(186,  28,  88), C10(170,  12,  72), C11(154,   0,  56), C12(138,  0,  40),

    D1(220, 198, 224), D2(206, 160, 228),  D3(190, 144, 212),  D4(171, 105, 198),
    D5(155,  89, 182), D6(142,  68, 173),  D7(126,  52, 157),  D8(110,  36, 141),
    D9( 94,  20, 125), D10( 78,  4, 109), D11( 62,   0,  93), D12( 30,   0,  61),

    E1( 57, 213, 255), E2( 41, 197, 255),  E3( 25, 181, 254),  E4( 34, 167, 240),
    E5( 18, 151, 224), E6(  2, 135, 208),  E7(  0, 119, 192),  E8(  0, 103, 176),
    E9(  0,  87, 160), E10(  0,  71, 144), E11(  0,  55, 128), E12( 16,  39, 112),

    F1( 94, 250, 247), F2( 81, 245, 234),  F3( 71, 235, 224),  F4( 55, 219, 208),
    F5( 39, 203, 192), F6( 23, 187, 176),  F7(  7, 171, 160),  F8(  0, 155, 144),
    F9(  0, 139, 128), F10(  0, 123, 112), F11( 16, 107,  96), F12(  0,  91,  80),

    G1(142, 255, 193), G2( 94, 252, 161),  G3( 78, 236, 145),  G4( 62, 220, 129),
    G5( 46, 204, 113), G6( 30, 188,  97),  G7( 14, 172,  81),  G8(  0, 156,  65),
    G9(  0, 140,  49), G10(  0, 124,  33), G11(  0, 108,  17), G12(  0,  92,   1),

    H1(253, 227, 167), H2(255, 207,  75),  H3(249, 191,  59),  H4(249, 179,  47),
    H5(245, 171,  53), H6(243, 156,  18),  H7(241, 137,  45),  H8(230, 126,  34),
    H9(216, 116,   0), H10(200, 100,   0), H11(184,  84,   0), H12(168,  68,  16),

    I1(255, 220, 181), I2(255, 194, 155),  I3(255, 178, 139),  I4(255, 162, 123),
    I5(255, 146, 107), I6(243, 130,  91),  I7(227, 114,  75),  I8(211,  98,  59),
    I9(195,  82,  43), I10(179,  66,  27), I11(163,  50,  11), I12(147,  34,  16),

    J1(246, 196, 163), J2(234, 184, 151),  J3(223, 173, 140),  J4(212, 162, 129),
    J5(206, 156, 123), J6(190, 140, 107),  J7(174, 124,  91),  J8(158, 108,  75),
    J9(142,  92,  59), J10(126,  76,  43), J11(110,  60,  27), J12( 94,  44,  11),

    K1(197, 211, 226), K2(188, 202, 217),  K3(172, 186, 201),  K4(156, 170, 185),
    K5(140, 154, 169), K6(124, 138, 153),  K7(108, 122, 137),  K8( 92, 106, 121),
    K9( 76,  90, 105), K10( 60,  74,  89), K11( 44,  58,  73), K12( 28,  42,  57),

    L1(213, 229, 230), L2(197, 213, 214),  L3(181, 197, 198),  L4(165, 181, 182),
    L5(149, 165, 166), L6(133, 149, 150),  L7(117, 133, 134),  L8(101, 117, 118),
    L9( 85, 101, 102), L10( 69,  85,  86), L11( 53,  69,  70), L12( 37,  53,  54),

    M1(224, 224, 224), M2(208, 208, 208),  M3(192, 192, 192),  M4(160, 160, 160),
    M5(144, 144, 144), M6(128, 128, 128),  M7(112, 112, 112),  M8( 96,  96,  96),
    M9( 80,  80,  80), M10( 64,  64,  64), M11( 48,  48,  48), M12(  0,   0,   0);

    private final Color COLOR;

    FlatColors(final int R, final int G, final int B) {
        COLOR = Color.rgb(R, G, B);
    }

    @Override public Color get() { return COLOR; }

    @Override public String rgb() { return Helper.colorToRGB(COLOR); }

    @Override public String rgba(final double OPACITY) { return Helper.colorToRGBA(COLOR, OPACITY); }

    @Override public String web() { return Helper.colorToWeb(COLOR); }
}
